#if !defined(AFX_MANUALRINGHANDLER_H__89971392_EE8B_4CC5_9CF1_6475107D6C75__INCLUDED_)
#define AFX_MANUALRINGHANDLER_H__89971392_EE8B_4CC5_9CF1_6475107D6C75__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ManualRingHandler.h : header file
//
#include "Util\MinButton.h"
#include "Util\MinLabel.h"

// Control Layer
class IRingHandler;
class IStateWaferTapeMount;
class IStateUnloaderLifter;

// Process Layer
class IAutoManager;
class ITrsRingHandler;
class ITrsLoaderPort;
class ITrsRobotBuffer;
// Common Layer
class CDMControlCenter;
class CRingHandlerPosData;
class CErrorCodeData;
class CDSTapeMountDoc;
class CSystemData;

#define MAX_RH_PUSH_SW		8
/////////////////////////////////////////////////////////////////////////////
// CManualRingHandler dialog

class CManualRingHandler : public CDialog
{
private:

	IRingHandler* m_lnkRingHandler;
	ITrsRingHandler* m_lnkTrsRingHandler;
	
	IStateUnloaderLifter* m_lnkStateUnloaderLifter;
	IStateWaferTapeMount* m_lnkStateWaferTapeMount;

	CErrorCodeData* m_lnkErrorCodeData;
	CSystemData* m_lnkSystemData;
	
	
	void ErrorDisplay(int nErrorCode);
	BOOL m_bErrorDisplay;

	BOOL StartInitFlag;
	BOOL m_bOldStatusPush[MAX_RH_PUSH_SW];

// Construction
public:
	UINT m_TimerID;
	BOOL m_TimerInitFlag;

// Construction
public:
	CManualRingHandler(IAutoManager* pAM, CDMControlCenter* pDMCC,CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CManualRingHandler)
	enum { IDD = IDD_MANUAL_RINGHANDLER };
	CMinButton	m_bRingHandlerVac2On;
	CMinButton	m_bRingHandlerVac2Off;
	CMinButton	m_bRingHandlerVacOn;
	CMinButton	m_bRingHandlerVacOff;
	CMinButton	m_bRingHandlerUp;
	CMinButton	m_bRingHandlerTurn;
	CMinButton	m_bRingHandlerReturn;
	CMinButton	m_bRingHandlerDown;
	CMinButton	m_bExit;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CManualRingHandler)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void ButtonInitial();
	void ButtonUpdate();
	// Generated message map functions
	//{{AFX_MSG(CManualRingHandler)
	afx_msg void OnExit();
	virtual BOOL OnInitDialog();
	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnRinghandlerUp();
	afx_msg void OnRinghandlerDown();
	afx_msg void OnRinghandlerTurn();
	afx_msg void OnRinghandlerReturn();
	afx_msg void OnRinghandlerVacon();
	afx_msg void OnRinghandlerVacoff();
	afx_msg void OnRinghandlerVacon2();
	afx_msg void OnRinghandlerVacoff2();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MANUALRINGHANDLER_H__89971392_EE8B_4CC5_9CF1_6475107D6C75__INCLUDED_)
